package com.zhuangjie.coupon.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.zhuangjie.coupon.entity.Coupon;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;


/**
 * 优惠券vo
 *
 * @author zhuangjie
 * @date 2024/03/02
 */
@Data
public class CouponVO extends Coupon {


    @ApiModelProperty("优惠卷名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("描述信息（如规则描述）")
    @TableField("describe")
    private String describe;

    @ApiModelProperty("优惠卷类型(0满减/立减卷，1折扣卷)")
    @TableField("type")
    private Byte type;

    @ApiModelProperty("膨胀规则-为空不可膨胀{\"概率值\":膨胀后金额,...}（issue_type=1）")
    @TableField("expansion_rule")
    private String expansionRule;

    @ApiModelProperty("优惠卷抵扣金额(n+m的n)")
    @TableField("par_value")
    private BigDecimal parValue;

    @ApiModelProperty("最低消费多少金额可用优惠券（门槛）")
    @TableField("threshold_amount")
    private BigDecimal thresholdAmount;

    @ApiModelProperty("是否可以叠加使用")
    @TableField("is_stackable")
    private Boolean isStackable;

    @ApiModelProperty("店铺id（仅店铺卷，平台卷null）")
    @TableField("shop_id")
    private Long shopId;

    @ApiModelProperty("张数")
    @TableField(value = "count",exist = false)
    private Integer count;

}
